package com.gxc.base64;

import java.nio.charset.Charset;
import org.springframework.util.Base64Utils;

/**
 * @author 宫新程
 * @since 2019/2/18 15:25
 */
public class Base64Test3 {

  public static void main(String[] args) {
    String baseStr =
        "rO0ABXNyABNqYXZhLnV0aWwuQXJyYXlMaXN0eIHSHZnHYZ0DAAFJAARzaXpleHAAAAABdwQAAAABc3IAT2NvbS55aWxpaHVvLmNsb3VkLnNlcnZpY2UuZ29vZHMuZHRvLmFwaS5nb29kcy5JbnNlcnRFbGVjUHJpY2VFc2xTdGF0dXNQYXJhbXNEdG8Q1nYVbpxTRAIADkwABGFwSWR0ABNMamF2YS9sYW5nL0ludGVnZXI7TAAHYmF0dGVyeXEAfgADTAAFZXNsSWR0ABJMamF2YS9sYW5nL1N0cmluZztMAApmaXJtd2FyZUlkcQB+AANMAApsYXN0SGJUaW1lcQB+AARMAANuZmNxAH4ABEwAFm9uVGVtcGVyYXR1cmVHYXRoZXJpbmdxAH4ABEwAB3Jlc2VydmVxAH4ABEwAB3JmUG93ZXJxAH4ABEwACnJvbVZlcnNpb25xAH4AA0wACnNlbGxlckNvZGVxAH4ABEwABnNldFdvcnEAfgADTAAGc2l0ZUlkcQB+AARMABR0ZW1wZXJhdHVyZUdhdGhlcmluZ3EAfgAEeHBzcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAABnNxAH4ABgAAAB90AAs1MC1COC01Ni1FRXNxAH4ABgAAAFJ0AA0xNTQ4MTM5OTE4ODIwdAAEdHJ1ZXQABHRydWV0AAZzdHJpbmd0AAI0MnNxAH4ABgAAAA10AAk4MDAwMDAwMDBzcQB+AAYAAAAUdAAHZGVmYXVsdHQABHRydWV4";


    byte[] bytes = Base64Utils.decodeFromString(baseStr);
    String s = new String(bytes, Charset.forName("UTF-8"));
    System.out.println(s);
  }
}
